 
<%@ page language="java" import="java.util.*,cn.ac.cintcm.dataconverge.researcher.domain.*,cn.ac.cintcm.dataconverge.util.*" pageEncoding="UTF-8"%>
<%@ page import="cn.ac.cintcm.dataconverge.researchsubject.domain.*,com.hs.core.db.*,java.util.*,com.hs.core.page.PageUtil,com.hs.core.utils.*" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
DBOperator dbo = new DBOperator(request.getSession().getServletContext());
Researcher researcher = (Researcher) request.getSession().getAttribute(
				Constants.USER_IN_SESSION);
Long orgId = -1l;
if(null != researcher && null != researcher.getOrg()){
	orgId = researcher.getOrg().getId();
}
String sql = "select a.*,TO_CHAR(REG_DATE,'YYYY-MM-DD') AS PUBLISHDATE,r.NAME from resman_inform a left join RESMAN_RESEARCHER r on a.REG_USER=r.ids where (reg_dept="+orgId +" or reg_dept=-1) and extend1='1' order by reg_date desc";
List list = dbo.select(sql,null);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>    
    <title>通知公告</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">    
     <link href="<%=basePath%>index/Themes/com/style.css" rel="stylesheet" type="text/css" />
    <script src="<%=basePath%>index/Scripts/Script.js" language="javascript" type="text/javascript"></script>
    <script language="javascript" type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
      <script src="<%=basePath%>js/common.js" language="javascript" type="text/javascript"></script>
    <script language="javascript">
    	function viewMessage(id){
    		 openwindow('<%=path%>/index/messageView.jsp?messageId='+id,'600','350');
    	}
    </script>
  </head>
 
<body  scroll="yes">
      <div class="r_rtm_tb_mg1">
        <div class="r_rtm_tb1">
            <img src="<%=basePath%>index/Themes/com/idt_tb_pass.gif" />&nbsp;通知公告
        </div>
    </div> 
    <div class="content">
        <table width="*" cellpadding="0" cellspacing="1" class="dg_borderstyle" id="Table4" >
            <tr>
                <td class="dg_headerstyle">
                    序号</td>
               <td class="dg_headerstyle" > 标题</td> 
               <td class="dg_headerstyle" > 发布人</td> 
               <td class="dg_headerstyle" > 发布时间</td> 
                  
            </tr>
            <% 
            if(list != null && list.size()>0){ 
            	for(int i = 0;i<list.size();i++){
            	 Map inform = (Map)list.get(i);
            %>
            <tr class="dg_alternatingitemstyle" onmouseover="ChangeRowBg(this);" onmouseout="ChangeRowBg(this);" onmouseup="ChangeRowBg(this);" onmousedown="ChangeRowBg(this);">
                <td align="center" width="5%">
                   <%= i+1 %></td>
                <td >
                    <a href="javaScript:viewMessage('<%=inform.get("ID") %>')"> <%=inform.get("INFORM_TITLE") %></a>
                </td>
                 <td width="10%" align="center">
                    <%=inform.get("NAME") %>
                </td>
                <td width="15%" align="center">
                    <%=inform.get("PUBLISHDATE") %>
                </td>
                 
                 
            </tr> 
            <%}} %> 
        </table> 
    </div>
  </body>
</html>
